class CreatePages < ActiveRecord::Migration
  def self.up
    create_table :pages do |t|
			t.string :title, :null=>false
			t.string :slug, :null=>false
			t.text :content
			t.integer :user_id, :null=>false
			t.integer :page_type_id
      t.timestamps
    end
    
    add_index :pages, [:page_type_id], :name=>"fk_page_type"
  end

  def self.down
    drop_table :pages
  end
end
